package com.oceansoft.mobile.econsole.modules.log.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.oceansoft.mobile.econsole.common.util.web.PageUtil;
import com.oceansoft.mobile.econsole.modules.apps.entity.AppDownload;
import com.oceansoft.mobile.econsole.modules.base.entity.Pager;
import com.oceansoft.mobile.econsole.modules.base.entity.Query;
import com.oceansoft.mobile.econsole.modules.log.entity.SysBlackLog;
import com.oceansoft.mobile.econsole.modules.log.persistence.IDownLogMapper;
import com.oceansoft.mobile.econsole.modules.log.service.IDownLogService;

@Service
public class DownLogServiceImpl implements IDownLogService {
	@Resource
	private IDownLogMapper downLogMapper;

	@Override
	public Pager<AppDownload> getDownLogPager(Query query) {
		PageHelper.startPage(query.getPageNum(), query.getNumPerPage(), true);
		Page<AppDownload> page = (Page<AppDownload>) downLogMapper
				.findPageByCondition(query);
		return PageUtil.page2pager(page, query);
	}
	@Override
	public List<AppDownload> loadExcel(Query query){
		List<AppDownload> list=downLogMapper.findExeclByCondition(query);
		return list;
	} 

}
